;; Test boolean logic operations (and, or, not)

(display "Testing boolean logic operations")
(newline)
(newline)

;; Test simple logical operations
(display "Simple AND operations:")
(newline)
(display "(and #t #t) => ")
(display (and #t #t))
(newline)
(display "(and #t #f) => ")
(display (and #t #f))
(newline)
(display "(and #f #t) => ")
(display (and #f #t))
(newline)
(display "(and #f #f) => ")
(display (and #f #f))
(newline)
(newline)

(display "Simple OR operations:")
(newline)
(display "(or #t #t) => ")
(display (or #t #t))
(newline)
(display "(or #t #f) => ")
(display (or #t #f))
(newline)
(display "(or #f #t) => ")
(display (or #f #t))
(newline)
(display "(or #f #f) => ")
(display (or #f #f))
(newline)
(newline)

(display "Simple NOT operations:")
(newline)
(display "(not #t) => ")
(display (not #t))
(newline)
(display "(not #f) => ")
(display (not #f))
(newline)
(newline)

;; Test multiple operands
(display "AND with multiple operands:")
(newline)
(display "(and #t #t #t) => ")
(display (and #t #t #t))
(newline)
(display "(and #t #f #t) => ")
(display (and #t #f #t))
(newline)
(newline)

(display "OR with multiple operands:")
(newline)
(display "(or #f #t #f) => ")
(display (or #f #t #f))
(newline)
(display "(or #f #f #f) => ")
(display (or #f #f #f))
(newline)
(newline)

;; Test nested logical operations
(display "Nested logical operations:")
(newline)
(display "(and #t (or #f #t)) => ")
(display (and #t (or #f #t)))
(newline)
(display "(or #f (and #t #t)) => ")
(display (or #f (and #t #t)))
(newline)
(display "(not (and #t #f)) => ")
(display (not (and #t #f)))
(newline)
(display "(and (not #f) (or #f #t)) => ")
(display (and (not #f) (or #f #t)))
(newline)
(newline)

;; Test edge cases
(display "Edge cases:")
(newline)
(display "(and) => ")
(display (and))
(newline)
(display "(or) => ")
(display (or))
(newline)
(newline)

;; Test with if conditions
(display "Boolean operations with if:")
(newline)
(display "(if (and #t #t) \"True Branch\" \"False Branch\") => ")
(display (if (and #t #t) "True Branch" "False Branch"))
(newline)
(display "(if (and #t #f) \"True Branch\" \"False Branch\") => ")
(display (if (and #t #f) "True Branch" "False Branch"))
(newline)
(newline)

(display "All tests completed!")
(newline)